package com.example.indenture.order.entity;

import com.example.indenture.common.entity.AbstractEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.springframework.stereotype.Component;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@Table(name = "orders")
@Component
public class Orders extends AbstractEntity {
    private Integer rid;//比赛id
    private Integer uid;//用户id
    private Integer tid;//队伍id
    private String orderId;//订单id
    private String alipayNo;//支付id
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;//支付时间
    private String state;//支付状态
    private Float total;//支付金额
}
